    form.on('submit([dy:tn]_search)', function(data){
      var field = data.field;
      table.reload('[dy:tn]', {
        where: field
      });
            layer.msg('已刷新');	  
    });	
    form.on('submit([dy:tn]_add)', function(data){
      layer.open({
        type: 2,title: '[dy:title]',content: '[dy:tn]_frm.asp?now=' + new Date().getTime() +"&type=[dy:tn]",maxmin: true
        ,area: ['500px', '450px']
        ,btn: ['确定', '取消']
        ,yes: function(index, layero){
          var iframeWindow = window['layui-layer-iframe'+ index]
          ,submitID = 'LAY-user-front-submit'
          ,submit = layero.find('iframe').contents().find('#'+ submitID);
          iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
            var field = data.field; 
				$.post(layui.setter.base + 'lib/reg.asp?now=' + new Date().getTime(), {
					action: "[dy:tn]_add",
					field
				},
				function(data) {
					if (data == '0') {
						layer.msg("成功!!");
					} else {
						layer.msg("失败！！ "+data);
					}
				});
            table.reload('[dy:tn]'); 

            layer.close(index); 
          });  
          submit.trigger('click');

        }
        ,success: function(layero, index){
          parent.$('#parentIframe').text('我被改变了');
        }
      });	
    });
	form.on('submit([dy:tn]_del_sel)', function(data){
      var field = data.field;
        var checkStatus = table.checkStatus('[dy:tn]')
        ,data = checkStatus.data;
		
		layer.confirm('您确定删除选中行？' , {
				icon: 3,
				title: '提示信息'
			},
		function(index) {
			var domain = location.protocol +"//" + location.host;
			domain=domain+'/dzps/src/views/user/user/pjson.asp?action=[dy:tn]_del_sel';
			$.ajax({
			type: "post",
			url: domain,
			data:JSON.stringify(data),
			dataType: 'json',
			success: function (data) {
			}
			});
			layer.close(index);
			table.reload('[dy:tn]');		
		});
    }); 	